// async-await语法依赖promise
// await是async await单词的简写，意为等待一个异步代码执行
let  sleep = (wait)=>{
    return  new  Promise((resolve,reject)=>{
       setTimeout(()=>{
       resolve(wait)
       },wait)
    })
}
async function demo(){
    let res1=await sleep(100);
    let res2=await sleep(res1+100);
    let res3=await sleep(res2+100);
    return res3;
}


demo().then(res=>{
    console.log(res);
})